import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;


public class GenAVMStructure
{
	public static final String OPERATION = "Operation";
	public static final String FORMAT = "Format";
	public static final String FORMS = "Forms";
	
	public static void main(String[] args)
	{
		try
		{
			BufferedReader br = new BufferedReader(new FileReader("./bin/res.txt"));
			
			int count = 0;
			String line = null;
			String preLine = null;
			while((line = br.readLine()) != null)
			{
				if(line.equals(OPERATION))
				{
					count++;
//					System.out.println(preLine);
				}
				if(FORMS.equals(preLine))
				{
					System.out.println(line);
				}
				preLine = line;
			}
			System.out.println(count);
		}
		catch (FileNotFoundException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		catch (IOException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
